<template>
	<view class="result">
		<image src="../../static/icon_success@2x.png" mode="aspectFill"></image>
		<view class="tip">恭喜您预约成功！信息已经发送到您的手机短信，请注意查收！</view>
		<view class="btn-list">
			<button @click="showOrder()" style="background: #AE6059;">继续预约</button>
			<button @click="showOrder(true)">查看预约</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type: undefined
			}
		},
		onLoad(options) {
			this.type = options.type
		},
		methods: {
			showOrder(isToOrderList) {
				if (isToOrderList) {
					uni.setStorageSync('toMineOrderList', this.type)
				}
				if (this.type == 1) {
					uni.navigateBack({
						delta: 3
					})
				} else {
					uni.navigateBack({
						delta: 2
					})
				}
			}
		}
	}
</script>

<style>
	.result {
		width: 100%;
		align-items: center;
		display: flex;
		flex-direction: column;
	}

	.result image {
		margin-top: 100rpx;
		height: 240rpx;
		width: 300rpx;
	}

	.result .tip {
		margin: 40rpx 80rpx 0 80rpx;
		font-size: 32rpx;
		color: #333;
	}

	.result .btn-list {
		width: calc(100% - 80rpx);
		margin: 300rpx 40rpx 0 40rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.result .btn-list button {
		color: #fff;
		border: 0;
		width: calc(50% - 20rpx);
		line-height: 100rpx;
		border-radius: 5rpx;
		font-size: 34rpx;
		background: #B9AC90;
		margin: 0;
	}
</style>
